<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@taglib prefix="s" uri="/struts-tags"%>   
<%@page pageEncoding="utf-8"%> 
<html xmlns="http://www.w3.org/199/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
		<link rel="stylesheet" type="text/css" href="<s:url value='/css/topic.css'/>"/>
		<link rel="stylesheet" type="text/css" href="<s:url value='/css/font.css'/>"/>
		<script language="javascript">
		  function saveReply() {
		    document.getElementById("reply.parentId").value=<s:property value="topicId"/>;
		  	replyForm.action="<s:url value='/bbs/saveReplyAction.action' includeParams='none'/>";
		  	replyForm.submit();
		  }
		</script>
	</head>
	<body style="margin-left:10px">
		<div id="topic">
			<div class="topicTitle">
				<li class="title"><s:text name="system.bbs.label.title"/><s:property value="topic.topicTitle"/></li>
				<li class="titleAttach">
					<span class="defaults"><s:text name="system.bbs.label.read"/></span>
					<span class="times"><s:property value="topic.children.size"/></span>
					<span class="defaults"><s:text name="system.bbs.label.reply"/></span>
					<span class="times"><s:property value="topic.children.size"/></span>				
					<span class="handle">[<s:text name="system.bbs.label.reply"/>]</span>
					<span class="handle">[<s:text name="system.bbs.label.read"/>]</span>
			  </li>
			</div>
			<div class="topicContent style12" wordrap="true">
				<s:property value="topic.topicContent"/>
			</div>
		</div>
	  <br/>
		<div id="replies">
		    <s:iterator value="topic.children">
		        <div class="reply">
		            <li class="replyContent style12">
		                <s:property value="replyContent"/>
		            </li>
		            <li class="sign">
		                <img src="<s:url value='/images/ch/sign_line1.gif'/>"/>
		            </li>
		            <li class="style2 author">
		                <span><s:property value="replyAuthor"/>&nbsp;&nbsp;<s:text name="system.bbs.label.publishedAt"/></span>
		                <span>&nbsp;&nbsp;<s:property value="formattedDate"/></span>
		            </li>
		        </div>
		    </s:iterator> 
		</div>
		<br/>
		<div id="newReply">
			<s:form name="replyForm" theme="simple">
			    <s:hidden name="reply.parentId"/>
				<ul class="style2">
					<li><s:text name="system.bbs.label.title"/><s:textfield name="reply.replyTitle" size="80"/></li>
					<li><s:text name="system.bbs.label.content"/><s:textarea name="reply.replyContent" cols="70" rows="15"/></li>
					<li style="text-indent:40px"><s:text name="system.bbs.label.replyAlert"/></li>
                    <li style="text-align:center"><img src="<s:url value='/images/ch/confirm.gif'/>" onclick="saveReply()"/></li>						
				</ul>
			</s:form>
		</div>
	</body>
</html>

